<include file="Home/Public/Header" />
  <link href="__CSS__/common.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" type="text/css" href="__CSS__/global.css">
  <link href="__CSS__/global_new.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" type="text/css" href="__CSS__/Public.css">
  <link rel="stylesheet" type="text/css" href="__CSS__/Personal.css">
  <link rel="stylesheet" type="text/css" href="__CSS__/date/dateRange.css"/>
  <script type="text/javascript" src="__SCRIPT__/date/dateRange.js"></script>
  <script type="text/javascript" src="__SCRIPT__/jquery-1.8.3.min.js"></script>
  <style type="text/css">
    .header {
      height:105px;
    }
    .size_selected {
      border:#f90 solid 1px;
      color:#f90;
      width:16px;
      height:16px;
      line-height:16px;
    }
    .cxFormtime {
      width: 69px;
      height:21px;
      margin-left:10px;
      border: medium none;
      cursor: pointer;
    }

    .downContent ul li {
      float:left;
      list-style-type:none;
    }
    .search_time_span {
      margin: 0 2px;
      background-color: #EFEFEF;
      border: 1px solid;
      padding: 4px;
    }
    .search_time_span_select {
      margin: 0 2px;
      background-color: #3D86EA;
      border: 1px solid #3D86EA;;
      padding: 4px;
      color: white;
    }
    .confirm_button {
      color: #fff;
      /*line-height: 1px;*/
      background: #06c;
      text-align: center;
      float: left;
      display: block;
      padding: 0 10px;
      text-decoration: none;
    }
    .downContent ul li {
      float:left;
      list-style-type:none;
    }
    .bail_notopeneds {
      background: #ffeaea;
      border: solid #ffabab 1px;
      padding: 10px;
      text-align: left;
      width:300px;
      margin-top:10px;
    }
    .sem-button {
      font-size:12px;
      cursor: pointer;
      display: inline-block;
      min-height: 1em;
      outline: 0;
      border: none;
      vertical-align: baseline;
      background: #E0E1E2;
      color: rgba(0, 0, 0, .6);
      font-family: Lato, 'Helvetica Neue', Arial, Helvetica, sans-serif;
      margin: 0 .25em 0 0;
      padding: 1px 6px;
      text-transform: none;
      text-shadow: none;
      font-weight: 700;
      line-height: 1em;
      font-style: normal;
      text-align: center;
      text-decoration: none;
      border-radius: .28571429rem;
      box-shadow: 0 0 0 1px transparent inset, 0 0 0 0 rgba(34, 36, 38, .15) inset;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      -webkit-transition: opacity .1s ease, background-color .1s ease, color .1s ease, box-shadow .1s ease, background .1s ease;
      transition: opacity .1s ease, background-color .1s ease, color .1s ease, box-shadow .1s ease, background .1s ease;
      will-change: '';
      -webkit-tap-highlight-color: transparent;
      -webkit-appearance: button;
      font: inherit;
      letter-spacing: normal;
      word-spacing: normal;
    }
    .sem-button.primary {
      background-color: #2185D0;
      color: #FFF;
      text-shadow: none;
      background-image: none;
      box-shadow: 0 0 0 0 rgba(34, 36, 38, .15) inset;
    }
    .sem-button.primary:hover {
      background-color: #1678c2;
      color: #FFF;
      text-shadow: none;
    }
    .sem-button.orange {
      background-color: #F2711C;
      color: #FFF;
      text-shadow: none;
      background-image: none;
    }
    .sem-button.orange:hover {
      background-color: #f26202;
      color: #FFF;
      text-shadow: none;
    }
    .sem-button.large {
      padding: 6px 12px;
      font-siez:14px;
    }
  </style>

</head>
<body>

<!--头部开始-->
<include file="Home/Public/top_box" />
<include file="Home/Public/Search" />
<!--头部结束-->
<div class="clear"></div>
<div class="center yxlb">您的当前位置是：首页 - <span style="color:#3366cc">我的游戏卖</span></div>
<div class="clear"></div>
<div class="center">
  <include file="Home/Member/LeftBar"/>
  <script type="text/javascript">
    var address = window.location.href.substring(window.location.href.lastIndexOf('/'));
    $('.personal_left ul li a').removeClass('global_a_hover');
    $.each($('.personal_left ul li'), function(i, item){
      var href = $(item).children('a').attr('href');
      href = href.substring(href.lastIndexOf('/'));
      if (address.indexOf(href) != -1) {
        $(item).children('a').addClass('global_a_hover');
      }
    });
  </script>
  <div class="personal_right">
    <div class="ddgl">
      <h1>我出售中的商品</h1>
      <form id="queryForm" method="post">
        <div class="yxddcx">
          <ul>
            <li id="selectors">
              <notempty name="selected">
                {$selected}
                <else />
                游戏分类/区/服：
                <select id="pid" name="pid">
                  <option value="0" selected="selected">全部</option>
                  <volist name="category" id="vo">
                    <option value="{$vo.gc_id}">{$vo.gc_name}</option>
                  </volist>
                </select>
                <select id="gameid" name="gameid">
                  <option value="0">请选择</option>
                </select>
                &nbsp;&nbsp;&nbsp;
                <select id="carrierid" name="carrierid">
                  <option value="0">请选择</option>
                </select>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <select id="groupid" name="groupid">
                  <option value="0">请选择</option>
                </select>
                商品类型：
                <select id="typeid" name="typeid">
                  <option value="0">请选择</option>
                </select>
              </notempty>
            </li>
            <li style="line-height:28px;"> <span style="float:left;">创 建 时 间：</span>

              <div class="ta_date" id="div_date1">
                <span class="date_title" id="date1"></span>
                <a class="opt_sel" id="input_trigger1" href="#">
                  <i class="i_orderd"></i>
                </a>
              </div>
              <div id="datePicker1"></div>

              <span style="margin-left:62px"></span>

              <!--<span class="timespan">
              	<a href="javascript:void(0);" class="search_time_span" id="aTodayDemo1">今天</a>
                <a href="javascript:void(0);" class="search_time_span" id="aRecent30DaysDemo1">最近1个月</a>
                <a href="javascript:void(0);" class="search_time_span" id="aRecent90DaysDemo1">3个月</a>
                <a href="javascript:void(0);" class="search_time_span" id="aRecent1YearDemo1">最近1年</a>
              </span>-->

            </li>
            <li> 商品名称：
              <input name="title" size="28" value="{$title}">
              <input type="hidden" id="selected" name="selected" value="" />
              <input type="submit" class="cxFormtime" value="" id="btnQuery">
            </li>


            <script type="text/javascript">
              //var STATS_START_TIME = '1329148800';
              var dateRange1 = new pickerDateRange('date1', {
                isTodayValid : true,
                aToday : 'aTodayDemo1', //今天
                aRecent30Days : 'aRecent30DaysDemo1', //最近30天
                aRecent90Days : 'aRecent90DaysDemo1', //最近90天
                aRecent1Year : 'aRecent1YearDemo1',//最近1年
                startDate : "{$startDate}",
                endDate : "{$endDate}",
                needCompare : false,
                defaultText : ' 至 ',
                autoSubmit : true,
                inputTrigger : 'input_trigger1',
                theme : 'ta',
                magicSelect : false
              });
              $(".timespan a").click(function(){
                $(".timespan a").removeClass("search_time_span_select");
                $(this).addClass("search_time_span_select");
              });

              $('.cxFormtime').click(function(){
                var oQueryForm = $('#queryForm');
                var oSelectors = $('#selectors');
                var aSelectors = oSelectors.find('select');

                oQueryForm.append($('#startDate'));
                oQueryForm.append($('#endDate'));

                for(var i = 0; i < aSelectors.length; i++){
                  var o = aSelectors.eq(i);
                  var f = o.find('option').eq(0);
                  var s = o.find('option:selected');
                  o.find('option').removeAttr('selected');
                  if(s.val() !== f.val() ){
                    s.attr('selected', 'selected');
                  }
                }
                //敏感词屏蔽
                var h = oSelectors.html().replace(/select/g, '###');
                $('#selected').val(h);
              });

              (function(){
                var frame = $('#selectors');
                var a = $('#pid');
                var b = $('#gameid');
                var c = $('#carrierid');
                var d = $('#groupid');
                var e = $('#typeid');

                var u1 = "{:U('Home/Api/GetCategoryOptionsHtml')}";
                var u2 = "{:U('Home/Api/GetTypeOptionsHtml')}";

                linkage(a, b, u1, frame);
                linkage(b, c, u1, frame);
                linkage(c, d, u1, frame);
                linkage(d, e, u2, frame);

                function linkage(a, b, u, group){
                  a.change(function(){
                    var offset = b.index() + 1;
                    var gp = group.find('select');
                    var len = gp.length;
                    for( var i = offset; i < len; i++ ){
                      gp.eq(i).html('<option value="0">请选择</option>');
                    }
                    b.html('<option>加载中...</option>');
                    changeIt(a, b, u);
                  });
                }

                function changeIt(a, b, url){
                  var _v = parseInt(a.val());
                  if( _v > 0  ){
                    $.post(url, {v: _v}, function(data){
                      b.html(data);
                    });
                  }else{
                    b.html('<option value="0">请选择</option>');
                  }
                }
              })();

            </script>

          </ul>
        </div>
        <div class="yxddlb">
          <div id="nave">
            <ol>
              <if condition="$status === ''">
                <a class="a_hover">全部</a>
                <else />
                <a href="{:U('Home/Member/MyGoods')}">全部</a>
              </if>
            </ol>
            <ol>
              <if condition="$status == '1'">
                <a class="a_hover">出售中的商品</a>
                <else />
                <a href="{:U('Home/Member/MyGoods', array('status'=>1))}">出售中的商品</a>
              </if>
            </ol>
            <ol>
              <if condition="$status == '0'">
                <a class="a_hover">审核中的商品</a>
                <else />
                <a href="{:U('Home/Member/MyGoods', array('status'=>0))}">审核中的商品</a>
              </if>
            </ol>
            <ol>
              <if condition="$status == '-1'">
                <a class="a_hover">已下架商品</a>
                <else />
                <a href="{:U('Home/Member/MyGoods', array('status'=>-1))}">已下架商品</a>
              </if>
            </ol>
          </div>
          <div class="ddxq">
            <ul>
              <li class="spmc">商品名称</li>
              <li class="zj">单价</li>
              <li class="sl">库存</li>
              <li class="khfw">客户服务</li>
              <li class="ddzt">状态</li>
            </ul>
          </div>
          <volist name="list" id="vo">
            <div id="menud_con">
              <div class="ddlb">
                <h1>商品ID：{$vo.goods_id}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;创建时间：{$vo.goods_time|date='Y-m-d H:i:s', ###}</h1>
                <ul class="clearfix" goodsid="{$vo.goods_id}">
                  <ol class="spmc">
                  <span style="color:#36c"> <img src="__IMAGE__/common/buy_ji.png"> {$vo.goods_title}
                  {$vo.gc_name} </span><br>
                    游戏区服：
                    <volist name="vo.goods_relation" id="vor" key="key">
                      <php>$t = count($vo['goods_relation']);</php>
                      <if condition="$key gt 1">
                        <a href="javascript:;" class="gray">{$vor.gc_name}</a> <if condition="$key lt $t">/</if>
                      </if>
                    </volist>
                  </ol>
                  <ol class="zj">
                    <span style="color:#F90">{:price($vo['goods_price'], false)}</span>元
                  </ol>
                  <ol class="sl">
                    {$vo.show_storage} <br>
                  </ol>
                  <ol class="khfw">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  </ol>
                  <switch name="vo.goods_status">
                    <case value="0">
                      <ol class="ddzt">
                        <a>审核中</a>
                      </ol>
                    </case>
                    <case value="1">
                      <ol class="ddzt">
                        <a>出售中</a>
                        <a href="{:U('Home/Member/SoldOut',array('id'=>$vo['goods_id']))}">下架</a>
                      </ol>
                    </case>
                    <case value="-1">
                      <ol class="ddzt">
                        <a>已下架</a>
                      </ol>
                    </case>
                      <case value="-2">
                          <ol class="ddzt">
                              <a>审核不通过</a>
                          </ol>
                      </case>
                      <case value="-3">
                          <ol class="ddzt">
                              <a>商品已删除</a>
                          </ol>
                      </case>
                  </switch>
                </ul>
              </div>
            </div>
          </volist>

          <script type="text/javascript">
            $('.confirm_cancel').click(function(){
              if( ! window.confirm('您确认要取消此订单吗?') ){
                return false;
              }
            });
          </script>
          <!--页码-->
          <div class="page">
            {$page}
          </div>
          <div class="clear"></div>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="clear"></div>
<include file="Home/Public/footer" />
</body>
</html>